using async to load data and template