replaced hardcoded card types with constants