simpler Gauss code