added learning portion