DIP homework 3