fix local storage and added count