use end() instead of convoluted count()