adapted python modules to new API