Added base for going counting and fixed some silly code