prob3 and prob4