updated function for inserting weatherdata.