messing around with page editing

changed the 'add page' function and added code