Changed an unnecessary HashMap to Map