generate costs