adding hg2lg function, has been tested, but need to add test example

2 jobs for master