adding functionality to add, edit and delete pages