added prob 4 & 5