added framework for training