Updated algorithm.py - added support for new commission model