added hanlder for rendering pages