moved facility search into directive