[greg] changed HashMap to Map