Updated algo with walking decision