adding test case inspired from SICP bank account exercise