auto generate cost if none given