Update lab1

v1.2

(replaced i-- with j--in purging logic)