Completed some exercises from ch6