updated problem5