added link logic