Another attempt for page sorting