some refactoring
incr