Issue #166 - modify code