[patterns] added singleton pattern