Problem6 done