oj&pat's code