scala example
minor changes