implemented BIC and AIC criteria for model order selection