refactor order crud