made api method async