Adjusted orgin code.