fixed example so it'll build
merged master
rewrote input checking to use a map lookup, slower by easier to read/write