Started fold function