wrote estimator class