Added final part of assignment 6