preprocessIds function

Preprocess subjects ID's.