added print_stats