first working versuion of orders flow