fixing sound function