updated delete to also delete last task