added seperate get_response function, support for response timeout added