Changed the gethost filter to a more grep like function instead of putting it directly into the query