made uid parameter optional in getPidIndex