implements object deletion (passes tests)