changed implementation for auto link