Creating page update functionality