added send_message to calculate_stat