The structure and potential energy function of BeH 2 ( X 1 Σ + g ) and H 2 S( X 1 A 1 ) molecules