@jin moved Map class. working on detection