improving code, async