Adding loop test code.