modularize and add support for other cards