testing with directory function