added one more function skeleton. some more work needed on the math formulas..