Plants 'can think and remember'