adding second layer machine learning algorithm.