fixing a slight issue with my counting