not incrementing properly