made the profit calculator configurable (still is pretty bad)