My first program. More complex than it looks.