oragnize everything into functions; use asString instead of
InputStreamReader