improve commenting, remove warnings by using bytearrayinput stream
instead of stringbufferinput stream