sorted ug apply page logic