added ex 4, 5 and another method to 2c