3rd assignment from interactive programming course