fixed never getting out of the for loop in the example
ran gofmt on everything