Stealing more code
Update brain API