order status refactoring