Before starting 3rd problem