First version of Gordon,untested...