removing unnecessary links