the architecture of the main script is changed using OOP