make taskmanager asynchronous