refacto some classes