moved python call to first line