ported to current git rust