refactored tts