modify pre-training functions