Adjusted code to suit multiple Ops