refactored to publicize classes