less boilerplate in magic.go, new magic: min, max, avg