modifications for issue #84