Add function for partial costs