cleaned up response, and added some logging