debug printing added