Page sorting initial implementation

not working