function for supporting async tree rendering added