added example for moving through an array