first attempt at a Go variant