added comment to explain list directory method