sorted out page navigation