codes for training