challenges 7 & 8 solved for set2