public wrong written fixed
optimize marker selection code