new map + hopefuly working algorithm