renamed result to output