Make from_buf method private