Implemented part A of the lab
iplemented part A and B