placed inputstream in a while is.available