added class to encapsulate directory searching