included functionality of addRecord in setRecord