refine classes