fixing bugs, added add_page template