working code for o2 and H2O