use correct method
test for directory