fix in shifting rule

fix in shifting rule
testing file included