Removed anonymous closure for testing