The effect of oxygen coverages on hydrogenation of Mg (0001) surface