tasks 2-4 solved