Implemented Homework 6 Q2-Q6