adds save and load feature to ferns