some scala work