prac 5,6,7 added, fixed 8 formatting