major modification for issue #3