rewrote provisioning check in python