added update function to PageBase class, also calling function in MainHandler