put learning rate stuff in separate class