add edit pages and functionality