refactored and add more tests with OrdersController