remove redundant arrows