tweak gdc and add gdc test
Merge pull request #24 from martiner/gdc

tweak gdc and add gdc test