call closure with entity