delete objects properly