added directory searching