added a lot of debug