Arthur's debugged version - 13/09/13