finished delete functionality