Improve code syntax for links assignment