code tidy
added request/response logging