loop unrolled for the testing purpose in the navaigation javascript