correct parsing of bracket expression
removed an unneeded function