remove unnecessary links