implemented conditional link
added conditional link tests