Implemented the 'edit page' function