add function for get length of link
add destory func