changed cart instance variables to methods