improving main method behaviour.