new code for pruning markers