Added onLoad function.