This now works and has been manually tested