add some learning code