Add comments for each mode and explain what exactly they are doing and in what they differ.