modifications for paragraph vector