adding rotation pertubation code -- not tested.