rearranged python scripts