tweaked for fail/pass cases
tweaked