started map-related algorithm