changed raise exception to fail