how to track down infinite loop?