added comments for prrogram flow