wrong increment used. use count++