added update page logic