comments and fixing a part where I was making two api calls when the counter got reset