Completed exercise, heavily based on the code presented

Signed-off-by: nuala <nuala@greendinghy.org.uk>