resolve shortened url.
refactoring