more debugging and cleaning