added update record functionality