Implemented all functionality. Does compile and run, but results are not validated