improving main example