modify auto_link method