add some functions to flattenClasses and its test
add contain and its test