Added learn function method