made changes adding some more debug info