Solution for the Go tour exercise