add better pages sorting