add terminal run mode, formatting tweak