exception handling when no match is found