more scala code