[DesignPatterns] adding index