added older version-compatible rust implementation