Wrote functions for testing into when used with hashmaps