Implemented assignment 3 part 1 - the G counter