Implemented bracket matching