we should parameterize with the more generic `Map` interface so implementation is more modular