removing trailing bracket