Renamed response function to handler