added threads and order structures, not sure if good