code so tommaso can look with me at the problems