some exercises with scala