Change card class to use index int