revised toggle function
changing display of tasks