added functionality to work with multiple cards