Added delete and update record functions