Finished non private algorithm for small data set.