Added function to handle whisper messages