replaced prit by debug print