bracket matching implemented