updated to changed api