fix distance based motivation, add last_action 'sensor'.  need to fix broken putNext now