basic example of POO (dipoles)