delete button works correctly now