refactored few classes