REFACTOR RAils4 ordering