use a HashMap to simplify testing