added count variable