add logging for request&response
added tests