added empty response detection
support multiple sessions