refactor sound handler