Removed duplicate code

fix for issue #196