logging to console
added headers to response