updated cart library to have new functions