first working version
first attempts to making it threadsafe
optimizing ARMA and ARMO methods