adding if statement for link block