Jeff's patch3. Resolves #3