first attemp with scala