added support for whole directory processing