added condition two limit the output links