code for the sugar brain project