updating code for OH and H groups