fixed everything but the counting