Problem 2 & 3 added