added C version of the Rosenbaum smahal