Learning implemented. Not working a minor bug exists