setting proper loop var. working blindly here still and making lots of mistakes.