refactoring of playing sounds