added proper delete functionality