delete redunant brackets