loop possible paths so we only add needed ones