removed Card class and optimization