fixed configuration and a better OOP approach