add exception handling and rewrite card finding method
cover changes for exceptions and card finding with tests