some javadoc / nicer code & prevent a NFE when path has no number in it