optimize the pages