method for returning headers