clean up closure constructor