using the state monad for listing tasks