simplify marker code