improved problems.py