Submitted multi variable cost function.

This is actually the SAME as the single variable I wrote.