Add learning funcation first version