rules for expanding brackets - Search