created weather function and controller for /weather