checking bracket order and number