Advanced technologies for rewiring the brain