add 'maxdepth' to previous committed fuction