lab2. Exercise4. finished