added algo for selecting maps