adding headers to response to it's own function