build return result code