added better delete functionality