adding batch learning