changing message sending functionality