Sample scala code