fix bug in readresponse()
refactoring
change style to fucking netbeans