Update cost.py
Merge pull request #7 from Zarathan/patch-6

cost.py -- Feb.5.2014