Initial work

Doesn't look like this was changed - still looping and checking the reference.