better error test