trying to solve the delete problem