uses increment() and getValue() in a complex object