added onLoad check for home page