improving variable names
adding Counter object to clean things up