some refactoring, and basic tones