improve card handling