Issue #77 : improve code efficiency