we might be able to do this comparision outside of the loop.