Untested but looks clean.
C