Add fold function and update readme