added debug printing