beginning of refactor towards unsupervised machine learning