skeleton code for training