add link method and parse_link function.