refactored and remastered classes