refactor customcard