Added counting
Refactored a separate module