added some tracing code dammit