small bug - should use System.out.print for out stream