Please put "lat", "lon" "invest_time" & Co. into an array and perform the index = uhList ... if (..) { } into a loop on the array itself.