cludging along...

I'm terrible at writing math functions.