Modified the second python script