instead of returning [][]int , perhaps you can return a slice of some unexported type, to make things more readable?