fixed bug to work with go test, have to use go test -debug