Solution to Q3 is added