moved all tracing to trace()