pages.
added tests for pages api.