added deletion of new'ed pointers