updated add_page and remove_page function to work with database interface (#13)