adapted python API to recent changes