removes extra bracketses