I'm having problems with the code below, it's not giving the results I expect and I cannot see what ...