increment correctly