delete functionality working properly