Finished Cost func.