addded lots of debugging