Tighter map algorithm