now fetches all the codes on a server at once, refactored the url options