added a delete button action. Fixed the toggle