updated problem6