Plants have a memory mechanism that could save them from climate change