reworking python scripts