Code given to Andrea to first test. It needs to be improved.