remove extraneous brackets