fixing weather function