added basic order logic