HW 2 functions added