refactor
added a UrlEntity Class to implement getUrl from the earlier abstract