improved the code for path depth and export it