cleaned up search logic; added formatted url to show matched term