added debug tracing printfs to constructor