initial upload --- agrees with Matlab version on all test data so far