ported scala example app