walk function added