added comment on how this prog works