problems with deleting obj from array