exercise 1.37: added lamda for inc/dec i