add link_to_function to fix #1132