added functional page editing (THERE IS AN ERROR BUT THE DOC UPDATE STILL GOES THROUGH. COME BACK TO IT)