added depth option for walking directories