Use a Thread instead of an array index