removes redunancies