Added problem 1 and problem 2 in a single script using flags