validate for shake function if condition modified