changed brackets to handle [---]