Enclosed async in function