a slightly more elegant solution for the reverse url