new algorthsm for map scaffold