ok, replaced StringBuffer with InputStream