misc edits
math function implementation (commented out)