fixing cardgen choice function