removed superfluous count variable