fix badge, add tests
simplify tests