refactor,output class