added method to trim the Url