modified standalone_spike_v1.m