Working version of gordon2