changed function definition in weatherapp