How does this program work?