tasks 1-6 solved