adding some debug logging