made Go program; much more efficient