template enhancement + method to check the regularity of a shift