my cp in ruby. roughly equivalent to .py.