adjust to changed api