simplifying it using standard methods from maps lib