delete method successfully implemented