Jeff's patch2. Resolves #2