implement marker selection functionality