transforming to a python script
 making the script work