Added erdös renyi random context and self-initializing function