manually merged changes from Neil