working for multiple brackets