updated to a smarter method1.py