refactor to use urls, not headers