Added comment for mod function.