uri => url
remove unecessary return
refactor to remove debugging, condense code