removed hardcoded num_labels calculation