Implemented the O2OQ Algorithm