Make algorithm async