implementation of closure using variadic templates