Intermediate python implementation ..