added C implementation, updated documentation