intermediate qaa, added tests in bandshifting, refactoring