This closes issue 2