Added Completed Functions for Assignment 2