closes #5

Please use this code change for #5 and merge to master