debugged for a while. gave up