more optimisations available in python
implement the full optimisation run in python