bracket logic complete