Added the beginings of the system's learning algorithm