communication working between function and open weather api