updated io functions. added coef estimation only. locations must be given