debug printing almost done