add basic greatest common divider