modifications for issue #54