added applyAfter condition