before doing something