debugging code for type inference