added test for async function