mode & modes functions
export mode