New smart needle to make brain surgery safer