better tracing
fix tests