saves and loads pages