added test for learn method