refactoring: osmp_terminal