better math
Merge pull request #18 from mahkoh/math

better math