copied code to *.py file.