tasks 1-4 solved