tasks 1-3 solved