scala example, better example