implemented delete functionality