added puts for debugging