added AdaptiveSub class and header