updating classes and polishing