semi-working add to cart function