working on generate_links