tried to add if statement to links