Initial code for Trainable