changed the logic of the task manager to be aware of the storage