get result code from server