added edit record functionality