added a few lines to debug