deleting table records before inserting new