adds page rendering functionality