Homework 3 - Completed functionality