removes unnecessary brackets