add basic mechanism for looping over a directory