simplify code to find bug, failure