updated problem5.py - bug still exist