complete assignment

First attempt at the assignment