adjustments in new marking algorithm