messages working correctly