Tasks 1-7 solved