async utility function