cleaned up set.go enough to pass compilation, not tested