(DONE COMMIT).HW_8 've been done based on HW_6 by adding counters