used in before action