adding page/refresh handler