add card register function