changed trade protocol to use tasks, added scheduler framework