completed exercise 4 and hence assignment! now onto extensive testing