register link
register link event handler
refactoring