Programming Assignment 2 - all functions DONE