condition for Mat step