added 2nd sample for scala