Changed code output to flexible path functionality