add condition before processing