use location preference to call the weather api