in progress commit to fix the cost learning stuff.