Added timer function for loading page