Assignment 6 - done code