heavy refactoring and praat