modified snake example