spets vectorized code initial commit