fix go vet issues
simplify for range loop