better way to card directive