revised py scripts