fix #2 modify to use url_for