add main lconsole-mode function