refactor out uri
refactor