latest changes now tested and confirmed to work