updates: made extract_training and compute_composed into classes