rename fold and add 'put' method