init card functionality