Semi working take1.py