v1.0 feature-parity with MATLAB implementation