add documentation for mode