adds single page functionality