handle messages better