refactor loadclass