improve python block