split out separate defs.go/defs_test.go