added reply_result function