added directory processing