make learner initialization functional