removed unused count variable