working on speeding up hg