add lots of printouts and calls to check()