refactor SOS printing