performance fix, don't use exception as flow control