refactoring audio stuff