sol for b)