add closure function in struct