refactor order model