added directory depth limit