more tidy up. deleted redundant counter increment
tidy up code, removing redundant code