refactoring
refactored with classes and main
refactored with classes