works, mostly. not quite sure what gdc(2,1) should return...