Commented out my failed solution and copied in Paul's