Device to treat epilepsy shows promise for stroke patients