add permalink and get final route