added more message handling