Changes for programming assignment 2

Added details to both functions. Tested.