add isLink() method
unused variable removed