fixing up closure