Windrow code that appears to work