added comments and fixed the issue with the 1st snapshot