fix delete function, confirm it's working!