refactor customer and order ref