removing unneded ']'