Functional MRI study of brain activity during state transitions in a learned artificial grammar