move object instantiation to Main class to follow the IoC idea