Split out brain logic