refactor compute.py
Merge pull request #38 from sidharthamani/master

refactor compute.py