optimized calculate function
Merge branch 'master' of https://github.com/kravse/Calculator