added record creation and update