slight modifications for training annotation in server mode