Getting results for Richard's code before modification into my code