added createRecord and saveRecord