used url_for instead of paths.