added some commments and progress display