Now compiles for singles.
Now compiles for singles.
Seems to compute correctly.