metti il tutto all'interno di un try - catch