added page switching