add classes and res