changes and debug printing