improved sending messages from backend