fixed incrementing problem