Assignment completed with both functions and comments