clean scala example, works locally and in the cloud