python routine updated