changed cost.py to conform to pep8