Completed question 25, applied a fix to solution of question 21.