Half way though implimenting supervisedLearning fuction.