added getPage and getPost functions