copied everything from the gh2hg repo