comments have been added to both functions; second commit