fixing incrementByOne procedure