generalized the scramble class