found and fixed error to do with refreshing insteed of loading new page