factory closure callback