refactor linkactivity