Added generator and resolve functions