refactor order table