tuning tern-mode